<?php
// +----------------------------------------------------------------------
// | ThinkPHP [ WE CAN DO IT JUST THINK ]
// +----------------------------------------------------------------------
// | Copyright (c) 2006~2018 http://thinkphp.cn All rights reserved.
// +----------------------------------------------------------------------

use \think\facade\Route;

Route::post('api/:version/payment', 'api/:version.payment/payment');//收银支付

Route::group([],function () {
    Route::get('api/getSingleAccessSign', 'api/Base/getSingleAccessSign');   /*获取签名*/
}) ->middleware(app\http\middleware\Json::class);


Route::group([],function () {
    Route::post('api/:version/addStreservation' , 'api/:version.StReservation/addStreservation');/*添加预约*/
    Route::post('api/:version/putStreservation' , 'api/:version.StReservation/updateStreservation');     /*更新预约*/
    Route::post('api/:version/cancelStreservation' , 'api/:version.StReservation/cancelStreservation');     /*取消预约*/


    Route::post('api/:version/syncStuser' , 'api/:version.StUser/syncStUser'); /*同步用户数据(新增或更新)*/
    Route::post('api/:version/syncStdept' , 'api/:version.StDept/syncStDept'); /*同步部门数据(新增或更新)*/


})//->middleware(app\http\middleware\Token::class)
    ->middleware(app\http\middleware\Json::class);


Route::group([],function () {
    Route::delete('api/:version/delStreservation/[:reservaId]' , 'api/:version.StUser/deleteStreservation'); /*删除预约*/
    Route::delete('api/:version/delStuser/[:userCode]' , 'api/:version.StUser/deleteStUser'); /*删除用户*/
    Route::delete('api/:version/delStdept/[:deptCode]' , 'api/:version.StDept/deleteStDept'); /*删除部门*/

})->middleware(app\http\middleware\Token::class);

